import {getApp} from "../utils";
import {message} from "antd";

export const customLogout = () => {
  const app = getApp();

  return new Promise((resolve, reject) => {
    app
      .auth()
      .signOut()
      .then(() => {
        message.info('登出成功！');
        resolve({status: 0, data: {}});
      })
      .catch((err) => {
        message.error('登出失败', err);
        reject({status: 1, msg: err});
      })
  })
};